
import delimited "ONS_Postcode_Lookup_UK_01_2018.csv", clear // 76s
ren postcode3 postcode6

keep postcode1 postcode2 postcode6 localautho* regioncode regionname

gen pcd = itrim(postcode6)
replace pcd	= regexr(pcd," ","") // quite slow as a command

duplicates drop pcd, force

save "0 - Shared Appreciation\data\la_region_postcode_lookup_2018", replace
